package controler;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

import main.Game;
import view.Ligne_view;


public class BuyListener implements ActionListener{

	Game game;
	Ligne_view lv;
	
	public BuyListener(Game g, Ligne_view ligne_view) {
		this.game=g;
		this.lv=ligne_view;
	}

	public void actionPerformed(ActionEvent e) {
		if(e.getActionCommand().equals("Buy the place")){
			game.buyPlace();
		}
		if(e.getActionCommand().equals("Buy Houses/Hotels")){
			//if the player can buy house, we must ask the number and check if he can
			game.buyHouses();
			
		}
		
	}

}
